<?php

use think\facade\Route;

/**登录+用户*/
Route::group('/user', function () {
    Route::post('login', '/Index/login');//小程序登陆
     Route::post('login_mobile', '/Index/login_mobile');//手机号+验证码登陆（h5）
    Route::post('upload', '/Index/upload')->middleware(\app\api\middleware\Auth::class);//图片上传
    Route::post('wxOpenId', '/Index/weOpenId');//小程序获取微信openid
    Route::get('get_qrcode', '/Index/get_qrcode')->middleware(\app\api\middleware\Auth::class);//获取分享二维码（小程序带参数的二维码）
    Route::get('userInfo', '/Index/get_user_info')->middleware(\app\api\middleware\Auth::class);//获取当前用户信息


});

//一些公用组件用例参考
Route::group('/demo', function () {
    Route::post('send_code', '/Demo/getvdcode');//短信
    Route::post('baidu_api', '/Demo/baidu_api');//百度身份证校验接口
    Route::post('upload', '/Demo/upload');//图片上传


});

/*文章
 * */

Route::group('/article', function () {
    Route::get('cates', '/Article/get_cates');//资讯分类
    Route::get('list', '/Article/list');//资讯列表
    Route::get('detail', '/Article/article_detail');//资讯详情

});